//
//  ORATableViewCell.m
//  类
//
//  Created by rimi on 2016/12/6.
//  Copyright © 2016年 zhongshuilian. All rights reserved.
//

#import "ORATableViewCell.h"
#import "DataSourceModel.h"

@implementation ORATableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self initalizeDataSource];
    }
    return self;
}


- (void)initalizeDataSource{
    
    [self.contentView addSubview:self.imgView];
    [self.contentView addSubview:self.makeimgView];
    [self.contentView addSubview:self.smallImgView];
    [self.contentView addSubview:self.contentLabel];
    [self.contentView addSubview:self.titleLabel];
    [self.contentView addSubview:self.lineView];
    
    
}


- (UIImageView *)imgView {
    if (!_imgView) {
        _imgView = [[UIImageView alloc] initWithFrame:AAdaptionRect(0, 0, kBaseWidth, 230)];
    }
    return _imgView;
}

- (UIView *)makeimgView {
    if (!_makeimgView) {
        _makeimgView = [[UIImageView alloc] initWithFrame:AAdaptionRect(0, 0, kBaseWidth, 230)];
        _makeimgView.backgroundColor=[UIColor blackColor];
        _makeimgView.alpha=0.3;
    }
    return _makeimgView;
}


- (UIImageView *)smallImgView {
    if (!_smallImgView) {
        _smallImgView = [[UIImageView alloc] initWithFrame:AAdaptionRect((750-700)/2, CGRectGetMaxY(self.imgView.frame)/AAdaptationWidth()-180, 10, 10)];
        _smallImgView.layer.borderWidth = 1.5;
        _smallImgView.layer.cornerRadius=AAdaptation(5);
        _smallImgView.layer.borderColor = [UIColor whiteColor].CGColor;
        _smallImgView.backgroundColor=[UIColor yellowColor];
    }
    return _smallImgView;
}


- (UILabel *)titleLabel {
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc] initWithFrame:AAdaptionRect(0, CGRectGetMaxY(self.imgView.frame)/AAdaptationWidth()-40, 414, 40)];
        _titleLabel.font =AAFont(15);
        _titleLabel.numberOfLines=0;
        _titleLabel.textColor=[UIColor whiteColor];
    }
    return _titleLabel;
}

- (UILabel *)contentLabel {
    if (!_contentLabel) {
        _contentLabel = [[UILabel alloc] initWithFrame:AAdaptionRect((750-675)/2, CGRectGetMaxY(self.smallImgView.frame)/AAdaptationWidth()-20, 330, 30)];
        _titleLabel.font =AAFont(5);
        _contentLabel.textColor = [UIColor whiteColor];
        _contentLabel.numberOfLines = 0;
    }
    return _contentLabel;
}

- (UIView *)lineView {
    if (!_lineView) {
        _lineView = [[UIView alloc] initWithFrame:CGRectMake(30, CGRectGetMaxY(self.imgView.frame)/AAdaptationWidth(), kBaseWidth, 15)];
    }
    return _lineView;
}

@end
